home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / TOOLS / BLDHOUND.ZIP / B.DOC < prev    next >
Encoding:
Text File  |  1988-05-28  |  82.3 KB  |  2,808 lines

  1.  
  2.  
  3.     
  4.  
  5.  
  6.     E G 
  7.     
  8.     ┌──────────────────────────────────────────────────────────────────────────┐
  9.     │                                                                          │
  10.     │                             BLOODHOUND (TM)                              │
  11.     │                                                                          │
  12.     │              A quality assurance program for the IBM PC                  │
  13.     │                                                                          │
  14.     │                                                                          │
  15.     │                                                                          │
  16.     │                                                                          │
  17.     └──────────────────────────────────────────────────────────────────────────┘
  18.     FH
  19.     
  20.     
  21.                                   Version 1.00
  22.     
  23.     
  24.     
  25.                                 Richard Fencel
  26.                                 1376 Deerpark Drive #22
  27.                                 Fullerton, Ca. 92631
  28.                                 (714) 760 - 9196
  29.     
  30.                                 (c) Copyright 1987
  31.     
  32.     
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.     
  65.  
  66.  
  67.  
  68.  
  69.                                                            EGBloodhoundFH
  70.  
  71.  
  72.     
  73.     EG
  74.                                    CONTENTS
  75.     FH
  76.     
  77.     1.0 WHAT IS BLOODHOUND?...........................................   2
  78.  
  79.     2.0 HOW DOES BLOODHOUND WORK?.....................................   4
  80.  
  81.     3.0 FEATURES......................................................   6
  82.  
  83.     4.0 INSTALLING BLOODHOUND.........................................   7
  84.  
  85.     5.0 TUTORIAL......................................................   8
  86.  
  87.     6.0 COMMAND LINE OPTIONS..........................................  13
  88.           6.1 "-r" record test      ..................................  13
  89.           6.2 "-m" make screen images for test........................  14
  90.           6.3 "-p" playback test, "-s" stop on failure................  15
  91.           6.4 "-a" append to test.....................................  17
  92.           6.5 "-c" close file after each entry, "-d" define disk drive  18
  93.           6.6 "-o" output screen comparisions to printer..............  19
  94.  
  95.     7.0 SCREEN CAPTURES UNDER PROGRAM CONTROL.........................  20
  96.  
  97.     8.0 SETTING OF TIME AND DATE......................................  22
  98.  
  99.     9.0 MANUAL EDITING OF TESTS.......................................  23
  100.  
  101.     10.0 UTILITY VIEW.EXE.............................................  25
  102.  
  103.     11.0 PROGRAM BREAKPOINTS..........................................  27
  104.  
  105.     12.0 CUSTOMIZING BLOODHOUND.......................................  32
  106.  
  107.     13.0 BLOODHOUND FILE STRUCTURE....................................  33
  108.  
  109.     14.0 MEMORY REQUIREMENTS..........................................  34
  110.  
  111.     15.0 COMPATIBILITY WITH SUPERKEY..................................  35
  112.  
  113.     16.0 HINTS AND SUGGESTIONS........................................  36
  114.  
  115.     17.0 LIMITATIONS..................................................  37
  116.  
  117.     18.0 ERROR MESSAGES...............................................  39
  118.  
  119.     19.0 LICENSE AGREEMENT AND DISCLAIMER.............................  41
  120.     
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.     EGMay 8, 1988                                              Page   1FH
  131.  
  132.  
  133.  
  134.  
  135.                                                            EGBloodhoundFH
  136.  
  137.  
  138.     EG 1.0 WHAT IS BLOODHOUND?  FH 
  139.  
  140.     Have you ever made a change to a software  program,  successfully  tested
  141.     the  change,  and  then  discovered later the change had bombed out other
  142.     areas?  
  143.  
  144.     Wouldn't it be nice to be able to do a single test  command  that  proves
  145.     your program in its entirety still works?  
  146.  
  147.     And  if  it  doesn't  still  work,  then  how  about a debug command that
  148.     executes your program to just prior to where the  bomb  occurs  and  then
  149.     halts, allowing you to watch the bomb in single step?  
  150.  
  151.     Lastly,  have you ever discovered a surprise bug in your program and then
  152.     pulled your hair out trying to recall exactly what keystrokes caused  the
  153.     blow-up?  
  154.  
  155.  
  156.     Enter BLOODHOUND, which solves all of the above problems.  
  157.  
  158.     Bloodhound  is  a  shareware  product.   Feel free to give a copy to your
  159.     friends.  However, if you leave Bloodhound installed on your machine  for
  160.     more than 30 days, you are obligated to pay a license.  The license is as 
  161.     follows:  
  162.  
  163.  
  164.                     1 machine              $50
  165.     
  166.                     additional machines    $10
  167.                     or network nodes
  168.     
  169.                     site license           $100
  170.     
  171.                     corporate license      $500
  172.                     (1-1000 employees)
  173.     
  174.                     corporate license      $1000
  175.                     (greater than 1000
  176.                     employees)
  177.  
  178.  
  179.  
  180.     A site license covers unlimited copying rights to Bloodhound at one 
  181.     address.  A corporate license covers unlimited copying rights to 
  182.     Bloodhound throughout the entire corporation around the world.  
  183.  
  184.     Site and corporate licenses free the owners from copyright liability 
  185.     (i.e.  lawsuits) throughout the area over which the license covers.  
  186.  
  187.     The site or corporate license allows any customers of the licensee to use 
  188.     Bloodhound for the purpose of testing products owned by the licensee.  
  189.  
  190.     Should a corporate license be purpose with less than 1000 employees for 
  191.     $500, no further license payment is required if the corporation grows 
  192.     beyond 1000 employees.  
  193.  
  194.  
  195.  
  196.     EGMay 8, 1988                                              Page   2FH
  197.  
  198.  
  199.  
  200.  
  201.                                                            EGBloodhoundFH
  202.  
  203.  
  204.     Please make checks payable to:  
  205.  
  206.  
  207.                                 Richard Fencel
  208.                                 1376 Deerpark Drive #22
  209.                                 Fullerton, Ca. 92631
  210.  
  211.  
  212.     Licensees are entitle to telephone technical support on an "as available" 
  213.     basis.  Please call (714) 524 - 6604 evenings/weekends/holidays.  There 
  214.     are currently no planned updates to Bloodhound (eg.  graphics screens or 
  215.     OS2).  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.     EGMay 8, 1988                                              Page   3FH
  263.  
  264.  
  265.  
  266.  
  267.                                                            EGBloodhoundFH
  268.  
  269.  
  270.     EG 2.0 HOW DOES BLOODHOUND WORK?  FH 
  271.  
  272.     BLOODHOUND works by building a "bloodhound test".  This is simply 
  273.     recording your keystrokes while you exercise your program and capturing 
  274.     the screen images resulting therefrom.  Then when you later make a change 
  275.     to your program and wonder if the change bombed any already working code, 
  276.     you tell BLOODHOUND to re-run the key sequence and check the new screen 
  277.     images against the "known good" images.  
  278.  
  279.  
  280.     To create a "bloodhound test", you issue the following command from DOS:  
  281.  
  282.                               C>b -r yourprog.exe
  283.  
  284.  
  285.     The above command causes your program to execute as normal but with 
  286.     BLOODHOUND running "underneath" and recording every keystroke ("-r" 
  287.     option indicates "record keystroke").  That is, BLOODHOUND (the program 
  288.     "bomb.exe") is the "background" program and "yourprog.exe" is the 
  289.     "foreground program".  
  290.  
  291.     Now exercise your program's various features until you have a complete 
  292.     test of your software.  Your software can either be a computer program, 
  293.     spreadsheet template, or any program that is expected to have a known 
  294.     display after a set of known keystrokes.  
  295.  
  296.     When you have a complete test, exit your foreground program to DOS.  Then 
  297.     type:  
  298.  
  299.                               C>b -m yourprog.exe
  300.  
  301.     This will replay all the keystrokes you just stored, while at the same 
  302.     time automatically saving the screen image after each keystroke or screen 
  303.     scroll ("-m" option indicates "make screen images").  
  304.  
  305.  
  306.     The value of having the bloodhound test is apparent when you make a 
  307.     change to your software and want to know if everything else still works.  
  308.     To exercise the bloodhound test you merely type from DOS:  
  309.  
  310.                             C>bomb -p yourprog.exe
  311.  
  312.  
  313.     BLOODHOUND runs thru the key sequence captured earlier and confirms that 
  314.     all the screen displays are identical to those displayed when the test 
  315.     was created ("-p" option indicates "playback test").  If there are 
  316.     discreprancies, they are output to the printer (or disk file) along with 
  317.     where they occurred in the test program.  
  318.  
  319.     For programmers, there exists the option of having BLOODHOUND 
  320.     automatically set a "breakpoint" in the test program at the keystroke 
  321.     just prior to where a bomb occurs.  Then the bloodhound test can be 
  322.     re-run and the breakpoint will activate.  
  323.  
  324.     This "breakpoint" is based on an arbitrary software interrupt which 
  325.     returns normally AX = 0 but is modified to return AX = 1 when a 
  326.  
  327.  
  328.     EGMay 8, 1988                                              Page   4FH
  329.  
  330.  
  331.  
  332.  
  333.                                                            EGBloodhoundFH
  334.  
  335.  
  336.     breakpoint is encountered.  
  337.  
  338.     The programmer makes use the breakpoint by inserting anywhere in his code 
  339.     a call to the chosen interrupt and then testing for the returned value of 
  340.     AX.  (The most logical place to do the interrupt call would be a central 
  341.     routine that is called whenever the keyboard is read).  If upon returning 
  342.     from the interrupt, AX = 1 then the breakpoint has occurred and the 
  343.     programmer can transfer control to a trap location.  
  344.  
  345.     Once in the trap location, the programmer can examine whatever variables 
  346.     he chooses and then single step his program right up thru the bomb.  Note 
  347.     that the bomb-out can be not only a screen display which failed to 
  348.     compare with a known "good" screen but also a catastrophic type error 
  349.     such as a keyboard freeze or the infamous "PARITY ERROR" message.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.     EGMay 8, 1988                                              Page   5FH
  395.  
  396.  
  397.  
  398.  
  399.                                                            EGBloodhoundFH
  400.  
  401.  
  402.     EG 3.0 FEATURES FH 
  403.  
  404.     Here is a summary of BLOODHOUND's features:  
  405.  
  406.  
  407.     
  408.          (1) Captures an unlimited number of keystrokes and screens in text mode
  409.              (graphics modes are planned for future releases).
  410.     
  411.          (2) User program itself can capture screens at arbitrary
  412.              points, i.e. keystrokes not required. This is useful in
  413.              environments where electrical signals, not user interaction drive
  414.              the program (eg. industrial control).
  415.     
  416.          (3) Screen images are automatically captured whenever user
  417.              program causes the screen to scroll (eg. via "printf" statements).
  418.     
  419.          (4) During playback, a copy of the original keystroke program is
  420.              automatically generated with breakpoints inserted wherever a screen
  421.              comparision failed.  This "debug" program can then be played back
  422.              in a way that allows the user program to stop just prior to when
  423.              the bomb occurs. This allows registers and variables to be examined
  424.              at the critical moment.
  425.     
  426.          (5) Can be used as a general purpose keyboard recorder whenever any
  427.              program is executed. This is useful so that if any unexpected bugs
  428.              occur while a user program is being run, an exact record is
  429.              retained of what keystrokes were made.
  430.     
  431.     
  432.  
  433.  
  434.  
  435.     BLOODHOUND requires an IBM PC or compatible with at least 320K RAM.  Also 
  436.     BLOODHOUND  does  not  support use of keys that do not generate an actual
  437.     keystroke such as "num lock", "scroll lock", "caps lock" or  combinations
  438.     such as "Ctrl Alt" or "Ctrl Break".  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.     EGMay 8, 1988                                              Page   6FH
  461.  
  462.  
  463.  
  464.  
  465.                                                            EGBloodhoundFH
  466.  
  467.  
  468.     EG 4.0 INSTALLING BLOODHOUND FH 
  469.  
  470.     Create  a  directory  private to BLOODHOUND, eg.  "blood".  Then dump the
  471.     entire contents of the BLOODHOUND disk into this subdirectory.  Now  copy
  472.     your  foreground  program  to be tested to this directory unless you have
  473.     "path'ed" to it.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.     EGMay 8, 1988                                              Page   7FH
  527.  
  528.  
  529.  
  530.  
  531.                                                            EGBloodhoundFH
  532.  
  533.  
  534.     EG 5.0 THE BLOODHOUND TUTORIAL FH 
  535.  
  536.     For the purpose of this tutorial, we are  going  to  use  the  foreground
  537.     program  called  "foregnd.exe".   This  is  a simple "C" language program
  538.     (source code "foregnd.c", included on your BLOODHOUND disk) that is a one 
  539.     line text editor.   Pressing  "Enter"  clears  the  line.   In  addition,
  540.     pressing  F1  prints  on  the screen a count from 1 to 100.  Pressing F10
  541.     returns to DOS.  
  542.  
  543.     Before we begin the tutorial a word  of  caution:   BLOODHOUND  will  not
  544.     execute if you have printing job running with the DOS command PRINT.COM.  
  545.  
  546.     To the begin the tutorial, enter from DOS:  
  547.  
  548.                               C>b -r foregnd.exe
  549.  
  550.     We now create an exhaustive test of "foregnd.exe".  Type the line:  
  551.  
  552.                        Now is the time for all good men
  553.  
  554.     Press  F10 to return to DOS.  The keys that you just typed are saved in a
  555.     file called "keys.tst" (it is possible to specify an arbitrary name as we 
  556.     shall see later.  However "keys.tst" is  the  default  name).   Thus  the
  557.     contents of "keys.tst" are:  
  558.  
  559.     N o w sp i s sp t h e sp t i m e sp f o r sp a l l sp g o o d sp m e n F10
  560.  
  561.     where  "sp"  indicates  the  keystroke  "space".   However, we still must
  562.     create accompanying screen images.  To do this, enter from DOS:  
  563.  
  564.                               C>b -m foregnd.exe
  565.  
  566.     Note that all the keys are played back when "-m"  is  invoked.   At  this
  567.     time  the screen images are also captured after each keystroke and stored
  568.     in a file called "keys.cmp".  
  569.  
  570.  
  571.     Now  we  have  a  complete  bloodhound  test  consisting  of  two  files,
  572.     "keys.tst"  (the  keystrokes  that drive up the test) and "keys.cmp" (the
  573.     screens that are compared against during the test).  Now suppose you made 
  574.     a change to "foregnd.exe" and want to assure yourself  that  the  earlier
  575.     recorded  keystrokes still produced the same screens.  Simply execute the
  576.     command:  
  577.  
  578.                               C>b -p foregnd.exe
  579.  
  580.     The test plays back the key strokes, compares the  resultant  screens  to
  581.     the  originally  recorded screens, and reports no errors.  You should see
  582.     the message:  
  583.  
  584.        Test "keys" of program "foregnd.exe" now complete
  585.  
  586.        Number of failures = 0
  587.  
  588.     The problem with the above example is that  it  is  really  is  not  very
  589.     interesting  since  it  all  works.   To  see what happens when we have a
  590.  
  591.  
  592.     EGMay 8, 1988                                              Page   8FH
  593.  
  594.  
  595.  
  596.  
  597.                                                            EGBloodhoundFH
  598.  
  599.  
  600.     failure, we are going to  playback  a  test  called  "bad.tst"  which  is
  601.     identical  to "keys.tst" except that one keystroke is bad, i.e.  the word
  602.     "men" is mispelled as "man".  Thus "bad.tst contains:  
  603.  
  604.     N o w sp i s sp t h e sp t i m e sp f o r sp a l l sp g o o d sp m a n F10
  605.  
  606.     To see what happens when we execute a test where the screen images do not 
  607.     correspond to the keystrokes, first copy "bad.tst"  to  "keys.tst"  after
  608.     saving the original file:  
  609.  
  610.                                C>copy keys.tst keys.sav
  611.                                C>copy bad.tst keys.tst
  612.  
  613.     Now playback your test modified to give an error:  
  614.  
  615.                              C>b -p -s foregnd.exe
  616.  
  617.     Note  that we have used the "-s" option during playback which means "stop
  618.     on failure".  This means whenever a screen  comparision  failure  occurs,
  619.     playback  will  stop,  giving  you  an opportunity to see exactly how the
  620.     screens differed when the failure occurs.  Regardles of whether the  "-s"
  621.     is used, screens comparision failures are always stored to disk for later 
  622.     perusal.  
  623.  
  624.     After  executing  the  above  command, your test is played back until the
  625.     screens differ when the word "man" is output  rather  than  "men".   When
  626.     this occurs you will see the screen:  
  627.  
  628.  
  629.     EG 
  630.                          SAMPLE FOREGROUND PROGRAM "foregnd.exe"
  631.     
  632.     Now is the time for all good man
  633.  
  634.  
  635.     ┌──────────────────────────────────────────────────────────────────────────┐
  636.     │                               BUG DETECTED                               │
  637.     ├──────────────────────────────────────────────────────────────────────────┤
  638.     │Press "F" repeatedly to flip between bad screen/good screen ("esc" to     │
  639.     │return to this menu)                                                      │
  640.     │                                                                          │
  641.     │Press "D" repeately to flip between difference in bad screen/good screen  │
  642.     │("esc" to return to this menu)                                            │
  643.     │                                                                          │
  644.     │Press space bar to continue playback                                      │
  645.     │                                                                          │
  646.     │Press "esc" to cancel playback                                            │
  647.     └──────────────────────────────────────────────────────────────────────────┘
  648.  
  649.  
  650.                         Figure 1: BLOODHOUND screen compare failure
  651.     
  652.     FH
  653.  
  654.     Pressing "F" will bring up the "bad screen", i.e.  the one that was shown 
  655.     by  the  playback.  Press "F" again will bring up the "good" screen, i.e.
  656.  
  657.  
  658.     EGMay 8, 1988                                              Page   9FH
  659.  
  660.  
  661.  
  662.  
  663.                                                            EGBloodhoundFH
  664.  
  665.  
  666.     the one that was originally recorded.  Pressing "F" again will  bring  up
  667.     the  bad  screen,  etc.   When  tired of this, "esc" returns to the above
  668.     error menu.  
  669.  
  670.     To see this in action, press:  
  671.  
  672.                               F              (bad screen appears)
  673.                               F              (good screen appears)
  674.                               F              (bad screen appears again)
  675.                               (esc)          (error menu appears)
  676.  
  677.  
  678.     Pressing "D" will show you  those  chars  on  the  bad  screen  that  are
  679.     different from those on the good screen.  Pressing "D" one more time will 
  680.     show  you  the  chars  on the good screen that are different from the bad
  681.     screen.  Press "D" again will show you the bad chars, etc.  When tired of 
  682.     this, "esc" returns to the above error menu.  
  683.  
  684.     To see this in action, press:  
  685.  
  686.                              D           (bad screen differences appear)
  687.                              D           (good screen differences appear)
  688.                              D           (bad screen differences appear again)
  689.                              (esc)       (error menu appears)
  690.  
  691.  
  692.     To continue playback from  an  error,  press  space  bar.   To  terminate
  693.     playback completely press esc.  
  694.  
  695.     Let's try the second screen compare.  Press 
  696.  
  697.                               (space bar)
  698.  
  699.     We again get a failure.  Look again at the differences.  Press 
  700.  
  701.                              D           (bad screen differences appear)
  702.                              D           (good screen differences appear)
  703.                              D           (bad screen differences appear again)
  704.                              (esc)       (error menu appears)
  705.  
  706.     Now lets abort the test completely.  Press 
  707.  
  708.                               (esc)
  709.  
  710.     and you return to DOS, displaying the message:  
  711.  
  712.        Test "keys" of program "foregnd.exe" now complete
  713.        Number of failures = 2
  714.  
  715.        To view test failures, type "VIEW keys"
  716.  
  717.  
  718.     Now suppose you didn't want to sit there and mind the space bar everytime 
  719.     a  failure  occurred.   You  then simply execute the playback without the
  720.     "-s" option.  Execute the command:  
  721.  
  722.  
  723.  
  724.     EGMay 8, 1988                                              Page  10FH
  725.  
  726.  
  727.  
  728.  
  729.                                                            EGBloodhoundFH
  730.  
  731.  
  732.                               C>b -p foregnd.exe
  733.  
  734.     Now the entire test will playback but not stop if  there  is  a  failure.
  735.     You will, however, hear a beep with each failure.  
  736.  
  737.     When playback is complete, you will see the message:  
  738.  
  739.     Test "keys" of program "foregnd.exe" now complete
  740.  
  741.     Number of failures = 2
  742.  
  743.     To view test failures, type "VIEW keys"
  744.  
  745.     (Note  that  playback  terminates  automatically if more than 10 failures
  746.     occur.  This "max failure number" can be changed if desired.  See section 
  747.     13.0).  The failures are stored in a file called "keys.err"  and  can  be
  748.     viewed off-line with the program VIEW.EXE as explained in section 10.0.  
  749.  
  750.     The last part of the tutorial is to add to a test already written.  We do 
  751.     this  by  playing back the original test to the end in "append" mode, and
  752.     thereafter we are prompted to add keystrokes.  
  753.  
  754.     First restore the orginal "keys.tst" that we corrupted earlier.  Type:  
  755.  
  756.                            C>copy keys.sav keys.tst
  757.  
  758.     Note that the last key of "keys.tst" is F10 which returns us to DOS.   We
  759.     must manually edit out this key or we will not be able to add to our test 
  760.     since  when  the  playback  is  complete  we  will  end  up  back in DOS.
  761.     Therefore modify keys.tst using your favorite word processor so  that  it
  762.     contains:  
  763.  
  764.     N o w sp i s sp t h e sp t i m e sp f o r sp a l l sp g o d sp m e n
  765.  
  766.     Now execute the test with the "-a" option:  
  767.  
  768.                               C>b -a foregnd.exe
  769.  
  770.     Your test will playback (no screen comparisions are done) until you reach 
  771.     the end and you see the message:  
  772.  
  773.                                  Appending to test "keys"
  774.  
  775.     You  may  now  start typing in the rest of your test, just as if you were
  776.     using the "-r" option.  When complete, re-generate the screens using  the
  777.     "-m" option and you have a fully re-written test.  Let's try this.  Type:  
  778.  
  779.                                       F1
  780.  
  781.     This causes the screen to count from 1-100.  When done press 
  782.  
  783.                                      enter
  784.  
  785.     The last command restores the screen to the one line word processor.  Now 
  786.     exit to DOS.  Type:  
  787.  
  788.  
  789.  
  790.     EGMay 8, 1988                                              Page  11FH
  791.  
  792.  
  793.  
  794.  
  795.                                                            EGBloodhoundFH
  796.  
  797.  
  798.                                       F10
  799.  
  800.     Regenerate the test screens by typing:  
  801.  
  802.                               C>b -m foregnd.exe
  803.  
  804.     Note  that everytime the screen scrolls, the screen image is captured and
  805.     made part of the test.  Playback the test with the command 
  806.  
  807.                               C>b -p foregnd.exe
  808.  
  809.     All screen images are compared successfully, even the  scrolls.   If  you
  810.     don't believe this, try instead the command:  
  811.  
  812.                             C>b -p -s foregnd1.exe
  813.  
  814.     The  program foregnd1.exe is identical to foregnd.exe except that it adds
  815.     one to the count that is output to the  screen.   Thus  you  will  get  a
  816.     failure on each screenfull of 25 lines.  
  817.  
  818.     This  completes the tutorial.  The remainder of the manual is a reference
  819.     section listing all of BLOODHOUND's features.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.     EGMay 8, 1988                                              Page  12FH
  857.  
  858.  
  859.  
  860.  
  861.                                                            EGBloodhoundFH
  862.  
  863.  
  864.     EG 6.0 COMMAND LINE OPTIONS FH 
  865.  
  866.  
  867.     EG 6.1 "-r" RECORD TEST FH 
  868.  
  869.     Use this to record keystrokes all keystrokes entered, for example:  
  870.  
  871.                           C>b -r foregnd.exe arg1 arg2
  872.  
  873.     where "arg1", "arg2" etc.  are command line arguments to "foregnd.exe".  
  874.  
  875.     There is no limit to the number of keys that can be recorded  since  they
  876.     are  stored to disk (unless your disk is full, in which case you will get
  877.     an error message to that effect).  The recording of the  test  ends  when
  878.     you return your foreground program to DOS.  
  879.  
  880.     After  you  have recorded all the keys you desire, you can then play them
  881.     back with the "-m" option to create the accompanying screen  images  (see
  882.     section 6.2).  
  883.  
  884.     Note  that  it  can  be useful to use the "-r" option in conjunction with
  885.     BLOODHOUND whenever you execute a  program  that  is  under  development,
  886.     regardless  of  whether  you intend to create a test.  This is because if
  887.     you should ever have the situation occur whereby you  get  an  unexpected
  888.     bug,  you  have  a  complete record of all keys that were pressed.  These
  889.     keys then be played back via the "-p" option described in section 6.3.  
  890.  
  891.     You can even set up an unobtrusive batch  file  so  that  executing  your
  892.     foreground  program  takes  no  more  keystrokes than normal.  An example
  893.     would be a batch file called "foregnd1.bat" which would  consist  of  the
  894.     following single line:  
  895.  
  896.                          b -r foregnd.exe %1 %2 %3 %4
  897.  
  898.     Thus you can execute your program by:  
  899.  
  900.                          foregnd1 arg1 arg2 arg3 arg4
  901.  
  902.  
  903.     Use  of the "-r" option always creates a file with extension ".tst", with
  904.     default stem "keys" so that the file created  in  the  above  example  is
  905.     "keys.tst".   It  is  in  this  file  that  the  keystrokes are recorded.
  906.     However, another stem can be specified after  the  "-r",  eg.   "-rhello"
  907.     creates file "hello.tst":  
  908.  
  909.                        C>b -rhello foregnd.exe arg1 arg2
  910.  
  911.  
  912.     The  ".tst" file is an ASCII file which can be edited like any other file
  913.     (see section 9.0).  
  914.  
  915.     The only problem with the "-r" option  is  that  if  you  execute  a  key
  916.     sequence  that  that  blows  up  your  system (eg.  produces the infamous
  917.     message "parity error") the key file will be lost since it is closed only 
  918.     when the foreground program returns to DOS.  To guard against  this,  use
  919.     the "-c" option (close key file after each keystroke):  
  920.  
  921.  
  922.     EGMay 8, 1988                                              Page  13FH
  923.  
  924.  
  925.  
  926.  
  927.                                                            EGBloodhoundFH
  928.  
  929.  
  930.                         C>b -r -c foregnd.exe arg1 arg2
  931.  
  932.     (the "-c" option is discussed in detail in section 6.5).  
  933.  
  934.  
  935.     EG 6.2 "-m" MAKE SCREEN IMAGES FOR TEST FH 
  936.  
  937.     This  option  plays  back  the  keystrokes  recorded  by the "-r" or "-a"
  938.     options ("-a" option is described in section 6.4) and  stops  after  each
  939.     keystroke or screen scroll to capture the screen and stores it to disk to 
  940.     a  file  with extension ".cmp" (screen compare file).  The correct format
  941.     is:  
  942.  
  943.                           C>b -m foregnd.exe arg1 arg2
  944.  
  945.     If no file name is specified after "-m" then it is assumed that the  file
  946.     "keys.tst"  is  to  be  played back and that the file contained resultant
  947.     screen images is called "keys.cmp".  Otherwise the "keys" is replaced  by
  948.     the indicated file stem, for example:  
  949.  
  950.                        C>b -mhello foregnd.exe arg1 arg2
  951.  
  952.     In   this   example  the  "hello.tst"  is  played  back  to  create  file
  953.     "hello.cmp".  
  954.  
  955.     Note that the screen image is saved whenever a key is struck or  whenever
  956.     data  scrolls  off  the screen.  The scrolling logic is explained in more
  957.     detail below.  
  958.  
  959.     The screen normally scrolls when the foregound program executes  commands
  960.     such  as "printf" statements in "C" or "PRINT" statements in "BASIC".  It
  961.     is the purpose of the BLOODHOUND scroll capture  logic  that  all  images
  962.     thus  created are recorded.  Later when the same keystrokes that produced
  963.     the scrolls are repeated, BLOODHOUND can then check that each  scroll  is
  964.     identical  (if it is desired not to have BLOODHOUND check the screen when
  965.     it scrolls, then use the "-i" option to inhibit scroll, eg.  "blood -m -i 
  966.     foregnd.exe" and "blood -p -i foregnd.exe").  
  967.  
  968.     Note that the scrolling capture works for any program that uses int  0x10
  969.     to  do  scrolling  (with  AH = 6 upon call to interrupt 0x10).  The first
  970.     time a 0x10 scroll occurs, the screen is saved (just prior to the  actual
  971.     scroll),  thereafter  it  is saved only when the entire page scrolls off.
  972.     For a full page scroll (such as that  caused  by  "printf")  this  is  25
  973.     lines.  The page length is calculated from the following formula:  
  974.  
  975.                               page length = DH - DL + 1
  976.  
  977.     where  DH,  DL  are  the  values  in these registers (i.e.  row #'s) when
  978.     interrupt 0x10 is called.  
  979.  
  980.     Note that the scrolling logic "resets" everytime a key is pressed.   When
  981.     the  scroll  "resets"  it  means that the screen will capture on the next
  982.     scroll instead of waiting a number of scrolls equal to the  page  length.
  983.     Thereafter the screen will capture after a number of scrolls equal to the 
  984.     page length.  
  985.  
  986.  
  987.  
  988.     EGMay 8, 1988                                              Page  14FH
  989.  
  990.  
  991.  
  992.  
  993.                                                            EGBloodhoundFH
  994.  
  995.  
  996.     Note  that  due to inherent DOS limitations and system timing, there is a
  997.     small but finite chance that the scrolling logic may miss a screen,  i.e.
  998.     a  screen may scroll past without being captured (if recording a test) or
  999.     compared (if playing back a test).  If this occurs you will see the error 
  1000.     message "Missed scroll image" and then control is returned to  DOS.   You
  1001.     will then have to redo your record/playback test.  
  1002.  
  1003.     The  small  possibility of missing a screen can be eliminated entirely by
  1004.     insuring that there is at least a 3 ms delay in  between  successive  int
  1005.     0x10   scroll   calls  for  page  length  of  25  lines  (delay  must  be
  1006.     proportionally longer for shorter page length) and a 70 ms delay  between
  1007.     int  0x10 scroll calls if they occur in a high level language instruction
  1008.     such as "printf" (regardless of page length).  However, these delays  are
  1009.     generally not necessary.  
  1010.  
  1011.     Note  that  should you desire to stop playback of the test while the "-m"
  1012.     option is invoked, press Ctrl-Alt and this will return control to DOS and 
  1013.     return with an exit code of 1.  
  1014.  
  1015.  
  1016.     EG 6.3 "-p" PLAYBACK TEST, "-s" STOP ON FAILURE FH 
  1017.  
  1018.     After you have created your test via "-r" and "-m" options, you can  play
  1019.     it back using "-p" option, for example:  
  1020.  
  1021.                          C>b -p foregnd.exe arg1 arg2
  1022.  
  1023.  
  1024.     The  result  will  be that "foregnd.exe" will be executed with keystrokes
  1025.     defined in "keys.tst" and  each  screen  compared  to  the  one  recorded
  1026.     earlier  using  file "keys.cmp".  If a failure occurs, then the beep will
  1027.     sound and both the "bad" screen and the "good one" will be  stored  to  a
  1028.     file  called  "keys.err".   When the playback is complete you may examine
  1029.     the good versus bad screens by using the program  VIEW.EXE  (see  section
  1030.     10.0).  
  1031.  
  1032.     Note  that during playback a special debug file is created with extension
  1033.     ".dbg" which is identical to the ".tst" file except that  the  test  item
  1034.     "BP" (breakpoint) is inserted after each key that caused a failure.  This 
  1035.     file  is  used  to  allow  programmers during debug to stop just prior to
  1036.     where the failure occurs and is discussed in detail in section 11.0.  For 
  1037.     now it suffices that the above playback example will create a debug  file
  1038.     called "keys.dbg".  
  1039.  
  1040.     If  you  specify  a file name after "-p" then it becomes the stem for the
  1041.     test files, for example:  
  1042.  
  1043.                        C>b -phello foregnd.exe arg1 arg2
  1044.  
  1045.     The above example plays back  keystroke  file  "hello.tst"  using  screen
  1046.     image  file  "hello.cmp",  deposits all compare errors in "hello.err" and
  1047.     creates a debug file called "hello.dbg".  
  1048.  
  1049.     It is sometimes preferable to see the failures as they occur rather  than
  1050.     store  them  for  later viewing.  This can be done with the "-s" (stop on
  1051.     failure) option:  
  1052.  
  1053.  
  1054.     EGMay 8, 1988                                              Page  15FH
  1055.  
  1056.  
  1057.  
  1058.  
  1059.                                                            EGBloodhoundFH
  1060.  
  1061.  
  1062.                         C>b -p -s foregnd.exe arg1 arg2
  1063.  
  1064.     The above invocation will cause BLOODHOUND to stop every time there is  a
  1065.     failure  and  allow  you  to  see  the exact differences between the good
  1066.     screens and bad screens.  
  1067.  
  1068.     Note that if you get more than 10 failures whether using the "-s"  option
  1069.     or  not,  BLOODHOUND assumes that something catastrophic has happened and
  1070.     will abort the test and return to DOS.  The maximum  number  of  failures
  1071.     can be changed via a configuration file as explained in section 12.0.  
  1072.  
  1073.     Also note that if even one failure occurs then when BLOODHOUND returns to 
  1074.     DOS with an exit code = 1.  This is useful if you are running a series of 
  1075.     tests and want to abort the entire series if any fails.  For example:  
  1076.  
  1077.                              blood -pmytest1 foregnd.exe
  1078.                              if ERRORLEVEL 1 GOTO END
  1079.                              blood -pmytest1 foregnd.exe
  1080.                              if ERRORLEVEL 1 GOTO END
  1081.                              blood -pmytest2 foregnd.exe
  1082.                              if ERRORLEVEL 1 GOTO END
  1083.                              :END
  1084.  
  1085.  
  1086.     Also  note  that playback can be interrupted by pressing "Ctrl Alt" which
  1087.     will return control to DOS with exit code of 1.  
  1088.  
  1089.     When the test is complete, the results will be output to the screen:  
  1090.  
  1091.                          Test xxxx of foreground program yyyy now complete
  1092.                          Number of screen failures = nnnn
  1093.  
  1094.  
  1095.     where:
  1096.                          "xxxx" is name of test just executed
  1097.                          "yyyy" is name of foreground program
  1098.                          "nnnn" is number of screen compares that failed
  1099.  
  1100.     If the test had at least one failure, you will also see:  
  1101.  
  1102.                     To view test failures, type "VIEW xxxx"
  1103.  
  1104.  
  1105.     The program "VIEW.EXE" is discussed in detail in section 10.0.  
  1106.  
  1107.     If you playback a test and there is no  ".cmp"  file  you  will  see  the
  1108.     message:  
  1109.  
  1110.        Can't find file xxxx.cmp no screen comparisions will take place
  1111.        during playback of keystrokes
  1112.  
  1113.     where  "xxxx"  is  the  name  of  the test to be executed.  This does not
  1114.     indicate a problem, i.e.  the message is merely to  remind  you  that  no
  1115.     ".cmp"  has  been  generated  so  that  you  are  not lulled into a false
  1116.     security when no failures occur.  
  1117.  
  1118.  
  1119.  
  1120.     EGMay 8, 1988                                              Page  16FH
  1121.  
  1122.  
  1123.  
  1124.  
  1125.                                                            EGBloodhoundFH
  1126.  
  1127.  
  1128.     In the case of a test  with  no  ".cmp"  file,  then  when  it  concludes
  1129.     playback you will see the message:  
  1130.  
  1131.              Playback xxxx of foreground program yyyy now complete
  1132.  
  1133.     which does not mention anything about number of failures.  
  1134.  
  1135.     Note  that if you experience the problem of where you record a test using
  1136.     the "-m" option, play it back immediately using the "-p" option  and  you
  1137.     get  failures without changing the foreground program, this can occur for
  1138.     one of two reasons:  
  1139.  
  1140.     (1) Your program outputs  the  time  to  the  display  and  the  time  is
  1141.     different for each of the two runs.  This problem might be solvable using 
  1142.     the  "TIME:"  test item described in section 8.0 or it might be necessary
  1143.     to disable output of the time altogether  as  describe  in  section  16.0
  1144.     (HINTS AND SUGGESTIONS) section (2).  
  1145.  
  1146.     (2)  Your  program  uses the timer interrupt to output data to the screen
  1147.     (other than the time as described above).  This can cause a problem since 
  1148.     the screen gets updated asynchronously to when the keyboard is read which 
  1149.     is when the screen is captured.  The solution is to assert a  time  delay
  1150.     between  each  key  so  that  the  screen has had enough time to "settle"
  1151.     before the next keystroke.  A delay can  be  specified  in  1/18's  of  a
  1152.     second  (clock ticks) by the statement "delay xxx" in config file "b.cfg"
  1153.     where "xxx" is the number of 1/18's of a second desired.  
  1154.  
  1155.     Another problem is that certain programs flush the keyboard  periodically
  1156.     and  this  can  cause  keystrokes  in  the test program to be missed.  By
  1157.     putting a timer tick  delay  between  keystrokes,  this  problem  can  be
  1158.     eliminated.  
  1159.  
  1160.     It  is  also possible to add a "power_on_delay" which delays execution at
  1161.     the a number of clock ticks at the start of the program.  This is  useful
  1162.     if you are experiencing spurious errors at the start of your program.  
  1163.  
  1164.     You may have to experiment to determine exactly what delays are required.  
  1165.     For  example,  if  you  were  recording a spreadsheet made with Lotus 123
  1166.     (registered trademark, Lotus Corp) then you would need  a  delay  between
  1167.     keystrokes of at least 2 timer ticks.  
  1168.  
  1169.     Use of config file "b.cfg" is discused in detail in section 12.0.  
  1170.  
  1171.  
  1172.     EG 6.4 "-a" APPEND TO TEST FH 
  1173.  
  1174.     The "-a" option is used when you have created a test that you wish to add 
  1175.     to.  
  1176.  
  1177.     Before  appending to a test, however, you must first manually delete from
  1178.     the ".tst" file whatever keystrokes returned your foreground  program  to
  1179.     DOS.   In  the  tutorial in section 5.0, we had a foreground program that
  1180.     looked like:  
  1181.  
  1182.     N o w sp i s sp t h e sp t i m e sp f o r sp a l l sp g o o d sp m e n F10
  1183.  
  1184.  
  1185.  
  1186.     EGMay 8, 1988                                              Page  17FH
  1187.  
  1188.  
  1189.  
  1190.  
  1191.                                                            EGBloodhoundFH
  1192.  
  1193.  
  1194.     Recall that "F10" returned the  foreground  program  to  DOS.   You  must
  1195.     therefore edit the program so that it looks like:  
  1196.  
  1197.     N o w sp i s sp t h e sp t i m e sp f o r sp a l l sp g o o d sp m e n
  1198.  
  1199.     Now execute the following batch command:  
  1200.  
  1201.                               C>b -a foregnd.exe
  1202.  
  1203.     This  will play back the test "keys.tst" and when complete a message will
  1204.     appear that says:  
  1205.  
  1206.                            Appending to test "keys"
  1207.  
  1208.     Now you can add to your test just as if you had the "-r" option on.  
  1209.  
  1210.     If you specify a file name after the "-a" then this becomes the file name 
  1211.     of the test you are appending to, for example:  
  1212.  
  1213.                             C>b -ahello foregnd.exe
  1214.  
  1215.     The above command  appends  to  the  test  "hello.tst".   Note  that  the
  1216.     playback  of the original test can be interrupted at any time by pressing
  1217.     "Ctrl - Alt" and you will return to DOS with an exit code of 1.  
  1218.  
  1219.  
  1220.     EG 6.5 "-c" CLOSE TEST FH 
  1221.  
  1222.     This option is used to save information that  would  be  lost  if  during
  1223.     recording  or  playback  of a test, the keyboard froze or the screen blew
  1224.     up, i.e.  control was lost.  
  1225.  
  1226.     The effect of the "-c" option is to close after each keystroke  the  data
  1227.     file  that  would  otherwise be lost.  The drawback with this approach is
  1228.     that it slows down operation considerably.  
  1229.  
  1230.     The "-c" option can be used in conjunction withthe "-r",  "-a",  or  "-p"
  1231.     options, for example:  
  1232.  
  1233.                              C>b -r -c foregnd.exe
  1234.  
  1235.                              C>b -a -c foregnd.exe
  1236.  
  1237.                              C>b -p -c foregnd.exe
  1238.  
  1239.  
  1240.     In  the  first  two  of the above examples, the ".tst" file that is being
  1241.     recorded is closed after each keystroke.  In the last example, the ".dbg" 
  1242.     file that is being created is closed  after  each  keystroke.   Thus  any
  1243.     keystroke that causes a problem that blows up the system will be included 
  1244.     in  the ".tst" or ".dbg" files which get closed just before the keystroke
  1245.     does its damage.  
  1246.  
  1247.     Note that it is possible to eliminate the delay caused by closing a  file
  1248.     after  every  keystroke  if  you  use a non-volatile RAM disk on which to
  1249.     store the files.  In such a case you must also tell BLOODHOUND the  drive
  1250.  
  1251.  
  1252.     EGMay 8, 1988                                              Page  18FH
  1253.  
  1254.  
  1255.  
  1256.  
  1257.                                                            EGBloodhoundFH
  1258.  
  1259.  
  1260.     letter of the RAM disk.  This is done with the "-d" option, for example:  
  1261.  
  1262.                            C>b -r -c -de foregnd.exe
  1263.  
  1264.     The  letter  of  the drive follows the "-d" so that in the above example,
  1265.     the file keys.tst will be written to drive "e:".  
  1266.  
  1267.     A manufacturer of non-volatile RAM disks is  Santa  Clara  Systems  Inc.,
  1268.     1610 Berryessa Road, San Jose, Ca.  95133, (408) 727-6700.  
  1269.  
  1270.  
  1271.     EG 6.6 "-o" OUTPUT SCREEN COMPARISIONS TO PRINTER FH 
  1272.  
  1273.     As well as writing the test results to the ".err" file, BLOODHOUND allows 
  1274.     you  to  output  the  results  to your printer.  To do this, add the "-o"
  1275.     option before you specify the foreground program, eg.  
  1276.  
  1277.                              C>b -p -o foregnd.exe
  1278.  
  1279.     This will causes all good screens/bad screens to be output to the printer 
  1280.     while the test executes.  
  1281.  
  1282.     Note that no screen attributes or colors are output  to  the  printer  so
  1283.     that  if  your  good  screen  versus  bad screen differs only in color or
  1284.     attribute, the printer outputs will be identical.  
  1285.  
  1286.     In such a case you must examine your test results  by  viewing  the  good
  1287.     screen/bad  screens  directly on the monitor using the program "VIEW.EXE"
  1288.     described in section 10.0.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.     EGMay 8, 1988                                              Page  19FH
  1319.  
  1320.  
  1321.  
  1322.  
  1323.                                                            EGBloodhoundFH
  1324.  
  1325.  
  1326.     EG 7.0 SCREEN CAPTURES UNDER PROGRAM CONTROL FH 
  1327.  
  1328.     There may be some occasions when you wish want to decide to capture  test
  1329.     screens  under  control  of  your  program  in  addition to the automatic
  1330.     captures that occur with each keystroke and each scroll.  
  1331.  
  1332.     This need could occur, for example,  when  your  program  is  controlling
  1333.     external  processes  and  the  program  advances  not  so  much  by  user
  1334.     keystrokes but by what electronic inputs it receives.  
  1335.  
  1336.     The solution is to have your program output to the screen the  status  of
  1337.     what  you  are controlling.  Then your program calls a BLOODHOUND-defined
  1338.     software interrupt which captures that screen to disk.  During  playback,
  1339.     the  same  software  interrupt  will  compare  the "good screen" captured
  1340.     earlier to the "new" screen and report any difference.  
  1341.  
  1342.     The way that the screen is captured is to invoke interrupt  the  "capture
  1343.     screen interrupt", 0xfd.  
  1344.  
  1345.     For example, consider the following assembly language program:  
  1346.  
  1347.                    LOOP:
  1348.                         MOV  AH,8
  1349.                         INT  21H         ;READ KEY INTO AL
  1350.                         CMP  AL,'X'      ;WAIT FOR KEY 'X'
  1351.                         JNE  LOOP
  1352.                         INT  0FDH        ;WHEN IT ARRIVES CAPTURE SCREEN
  1353.  
  1354.     The  above  program captures the screen whenever "x" is inputted into the
  1355.     keyboard.   The  keyboard  input  could  just  have  well  have  been  an
  1356.     electronic  input after which a lot of data could be dumped to the screen
  1357.     and INT 0xfd invoked to save the screen.  
  1358.  
  1359.     Note that screen captures via interrupt 0xfd will  occur  only  when  the
  1360.     test  is played back with the "-m" option.  Thus the correct procedure is
  1361.     thus to first create a test with "-r" of all  the  keystrokes  that  your
  1362.     system  needs.  Then generate the test screens with the "-m" option which
  1363.     plays back all keys and will capture the screen for  each  key  and  will
  1364.     also capture the screen everytime interrupt 0xfd is called.  
  1365.  
  1366.     During  screen  compare  playback,  i.e.   "-p"  option, whenever 0xff is
  1367.     asserted then the screen image at  that  time  is  compared  to  the  one
  1368.     captured when 0xff was asserted during "-m" playback.  
  1369.  
  1370.     Note  that  if  the  foreground  program has changed so that it no longer
  1371.     asserts 0xfd where it did before, then the screen comparision  will  fail
  1372.     since the previously saved image from 0xfd will be compared to the screen 
  1373.     belonging  to the next keystroke.  To restore the synchronization, simply
  1374.     re-generate the tests using the "-m" option.  
  1375.  
  1376.  
  1377.     Another consideration is during normal operation,  when  your  foreground
  1378.     program  is  executed without BLOODHOUND.  At such a time when it asserts
  1379.     interrupt 0xfe it will go into never-never land since there will at  that
  1380.     time be nothing defined at that interrupt.  The way to solve this problem 
  1381.     is  to  have  a special command line argument for your foreground program
  1382.  
  1383.  
  1384.     EGMay 8, 1988                                              Page  20FH
  1385.  
  1386.  
  1387.  
  1388.  
  1389.                                                            EGBloodhoundFH
  1390.  
  1391.  
  1392.     called, for example, "test_mode" that indicates BLOODHOUND is running and 
  1393.     interrupt 0xfe can be safely asserted.  This technique  is  described  in
  1394.     more detail in section 11.0.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.     EGMay 8, 1988                                              Page  21FH
  1451.  
  1452.  
  1453.  
  1454.  
  1455.                                                            EGBloodhoundFH
  1456.  
  1457.  
  1458.     EG 8.0 SETTING OF TIME AND DATE FH 
  1459.  
  1460.     If  your foreground program displays the time and date on the screen then
  1461.     you will have a problem whereby you  will  always  get  errors  when  you
  1462.     playback your test since the time and date will be different each time.  
  1463.  
  1464.     The  solution  is  to  have  BLOODHOUND set the system time and date to a
  1465.     known value while you are recording the test.   Thus  when  you  playback
  1466.     your test it will always start with the same time and date.  
  1467.  
  1468.     This  can  be done by manually editing the ".tst" file so that you insert
  1469.     "TIME:hh:mm:ss" and "DATE:yy/mm/dd" into your test, for example:  
  1470.  
  1471.         TIME:13:06:00 DATE:80/1/23 h e r e sp a r e sp t h e sp k e y s
  1472.  
  1473.     After the time and date have been  edited  into  the  ".tst"  file,  then
  1474.     execute  BLOODHOUND with the "-m" option to generate all the screens with
  1475.     the time and date starting from where you indicated in using "TIME:"  and
  1476.     "DATE:".   Note  that the above example, BLOODHOUND sets the time to 1:06
  1477.     pm, January 1, 1980 and then executes the keys ("TIME:" and  "DATE:"  can
  1478.     be used anywhere in the test).  
  1479.  
  1480.     Time  must  be in the form in the form HH:MM:SS where HH varies from 0 to
  1481.     23, and MM and SS varies from 0-59.  "SS" is optional but you still  must
  1482.     have all 3 semicolons, eg.  "14:06:".  
  1483.  
  1484.     Date  must  be  in  the  form  MM/DD/YY where "MM" varies from 1-12, "DD"
  1485.     varies from 1-31 and "YY" varies from 80 - 99.  
  1486.  
  1487.     There exists a potential problem with the time setting  and  that  is  if
  1488.     when you playback your test, you capture the screen at a time that is one 
  1489.     second  different than when you recorded it.  Should this type of problem
  1490.     occur, the only solution is to inhibit the display of time  as  explained
  1491.     in section 16.0, HINTS AND SUGGESTIONS, item (2).  
  1492.  
  1493.     When BLOODHOUND exits to DOS the system time will be automatically set to 
  1494.     the  "real"  time  within  1/18 second of what it would have been had the
  1495.     "TIME:" feature not be invoked.  The date will also be restored  to  what
  1496.     it would have been had not the "TIME:" or "DATE:" feature been invoked.  
  1497.  
  1498.     Manual  editing  of tests to include such features as "TIME:" and "DATE:"
  1499.     is discussed in detail in the next section.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.     EGMay 8, 1988                                              Page  22FH
  1517.  
  1518.  
  1519.  
  1520.  
  1521.                                                            EGBloodhoundFH
  1522.  
  1523.  
  1524.     EG 9.0 MANUAL EDITING OF TESTS FH 
  1525.  
  1526.     Each test recorded becomes an ASCII file  with  extension  ".tst".   This
  1527.     file can be edited with any ASCII editor.  
  1528.  
  1529.     The test file "keys.tst" in the tutorial of section 5.0 has the following 
  1530.     contents:  
  1531.  
  1532.     N  o  w  sp i s sp t h e sp t i m e sp f o r sp a l l sp g o o d sp m e n
  1533.     F10 
  1534.  
  1535.     The test is nothing but an ASCII file listing the keys pressed  separated
  1536.     by spaces.  Note, however, that some keys have special notations:  
  1537.  
  1538.                         notation           key
  1539.     
  1540.                            sp              space bar
  1541.                            tab             tab key
  1542.                            enter           enter/return
  1543.                            home            home
  1544.                            end             end
  1545.                            PgUp            page up
  1546.                            PgDn            page down
  1547.                            Ins             insert
  1548.                            Del             delete
  1549.                            rt              cursor right
  1550.                            lf              cursor left
  1551.                            up              cursor up
  1552.                            dn              cursor down
  1553.                            esc             escape
  1554.                            bs              backspace
  1555.  
  1556.  
  1557.     Function keys are designated "F1, F2, F3, F4, F5, F6, F7, F8, F9, F10".  
  1558.  
  1559.     The  "alt",  "shift"  and  "ctrl"  functions are designed by the prefixes
  1560.     "a-", "s-" and "c-" respectively, eg.  
  1561.  
  1562.                            a-F1            alt F1
  1563.                            s-tab           shift tab
  1564.                            c-home          control home
  1565.  
  1566.  
  1567.     All key notations are case insensitive, i.e.   "home"  is  equivalent  to
  1568.     "HOME".  
  1569.  
  1570.     Keys with codes 1-6 and 14-27 (eg.  ctrl-s which gives code ASCII 19) are 
  1571.     stored literally (eg.  double exclamation point for 19).  
  1572.  
  1573.     Time and date settings have the prefixes "TIME:" and "DATE:" respectively 
  1574.     followed by the desired time and date.  
  1575.  
  1576.     Breakpoints are indicated by "BP" and discussed in section 11.0.  
  1577.  
  1578.     A table of these non-key test items is shown below:  
  1579.  
  1580.  
  1581.  
  1582.     EGMay 8, 1988                                              Page  23FH
  1583.  
  1584.  
  1585.  
  1586.  
  1587.                                                            EGBloodhoundFH
  1588.  
  1589.  
  1590.         test item                 format                    example
  1591.     
  1592.         breakpoint                BP                        BP
  1593.         set date                  DATE:MM/DD/YR             DATE:1/2/87
  1594.         set time                  TIME:HH:MN:SS             TIME:15:30:00
  1595.  
  1596.  
  1597.     You  may  edit  the test file with any ASCII editor if you wish to modify
  1598.     the test.  Note, however, that any test edit will  require  re-generating
  1599.     the screens using the "-m" option.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.     EGMay 8, 1988                                              Page  24FH
  1649.  
  1650.  
  1651.  
  1652.  
  1653.                                                            EGBloodhoundFH
  1654.  
  1655.  
  1656.     EG 10.0 UTILITY VIEW.EXE FH 
  1657.  
  1658.     There exists a utility program "view.exe" which allows you to examine the 
  1659.     disk files that contain all the screen comparision errors.  
  1660.  
  1661.     Recall  that if any errors have occurred they will be output to a file of
  1662.     form "testname.err" which may be examined by VIEW.  For example,  suppose
  1663.     you  had  created a test called "badtest" that you executed via the batch
  1664.     playback:  
  1665.  
  1666.                            C>b -pbadtest foregnd.exe
  1667.  
  1668.     Then when the test finished executing you found you have 4 compare errors 
  1669.     in "badtest.err".  To see these errors execute:  
  1670.  
  1671.                                 C>view badtest
  1672.  
  1673.  
  1674.     The screen then displays:  
  1675.  
  1676.  
  1677.     EG 
  1678.     
  1679.     
  1680.     ┌──────────────────────────────────────────────────────────────────────────┐
  1681.     │  View Screen Failures V1.00             Sunday   March 8, 1987   2:06 am │
  1682.     └──────────────────────────────────────────────────────────────────────────┘
  1683.  
  1684.  
  1685.     ┌──────────────────────────────────────────────────────────────────────────┐
  1686.     │                Screen Failure 1 of 4 for test "badtest"                  │
  1687.     ├──────────────────────────────────────────────────────────────────────────┤
  1688.     │Press "F" repeatedly to flip between bad screen/good screen ('esc' to     │
  1689.     │return to this menu)                                                      │
  1690.     │                                                                          │
  1691.     │Press "D" repeately to flip between difference in bad screen/good screen  │
  1692.     │("esc" to return to this menu)                                            │
  1693.     │                                                                          │
  1694.     │Press F10 to select next screen failure, press F9 to select previous      │
  1695.     │                                                                          │
  1696.     │Press "home" to return to first screen failure                            │
  1697.     │                                                                          │
  1698.     │Press "esc" to return to DOS                                              │
  1699.     └──────────────────────────────────────────────────────────────────────────┘
  1700.     
  1701.     
  1702.                      Figure 4: VIEW menu for screen compare failure
  1703.     
  1704.     FH
  1705.  
  1706.  
  1707.     You can flip to the  good  screen/bad  screen  just  as  you  did  during
  1708.     playback  of  manual mode or press F10 to advance to the next failure and
  1709.     F9 to return to the previous one.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.     EGMay 8, 1988                                              Page  25FH
  1715.  
  1716.  
  1717.  
  1718.  
  1719.                                                            EGBloodhoundFH
  1720.  
  1721.  
  1722.     Note that if no test is specified when VIEW.EXE is invoked, then the test 
  1723.     error file defaults to "keys.err".  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.     EGMay 8, 1988                                              Page  26FH
  1781.  
  1782.  
  1783.  
  1784.  
  1785.                                                            EGBloodhoundFH
  1786.  
  1787.  
  1788.     EG 11.0 PROGRAM BREAKPOINTS FH 
  1789.  
  1790.     A breakpoint in your test program is used to allow you to  interrupt  the
  1791.     playback   of  a  test  under  control  of  a  debug  program  (eg.   DOS
  1792.     "debug.com").  This allows you to examine  the  internal  status  of  the
  1793.     currently executing foreground program.  
  1794.  
  1795.     Breakpoints  are  put into a test program by use of the string "BP" after
  1796.     the keystroke you wish to break on.  You  can  thus  manually  edit  your
  1797.     ".tst" file and insert "BP" whereever you wish.  
  1798.  
  1799.     In order to use the breakpoint, you must re-write your foreground program 
  1800.     to invoke interrupt 0xff after each key is input.  
  1801.  
  1802.     During  playback,  if the "BP" is encountered, interrupt 0xff will return
  1803.     AX = 1 rather than AX = 0.  This can be sensed by the foreground  program
  1804.     so that it can trap to a breakpoint location.  
  1805.  
  1806.     For example, suppose we had a program "mytest.tst" that looked like:  
  1807.  
  1808.     N o w sp i s sp t h e sp t i m e
  1809.  
  1810.     Now suppose we edited it to look like:  
  1811.  
  1812.     N o w sp i s sp t h e BP sp t i m e
  1813.  
  1814.     Assume our routine to read the keyboard interrupt originally looked like:  
  1815.  
  1816.  
  1817.     read_keyboard()
  1818.     {
  1819.     int scan,key;
  1820.     
  1821.     scan =kbin( key);
  1822.     }
  1823.     
  1824.     Now assume that it was modified to be:
  1825.     
  1826.     
  1827.     read_keyboard()
  1828.     {
  1829.     int scan,key;
  1830.     
  1831.     scan =kbin( key);
  1832.     int86(0xff,  inregs,  outregs);              /* test for breakpoint */
  1833.     if (outregs.x.ax == 1) breakpoint();
  1834.     }
  1835.  
  1836.  
  1837.  
  1838.     In above modified keyboard routine, as soon as the character "e" (in "t h 
  1839.     e")  is  input  the  function  "breakpoint()"  will be executed.  This is
  1840.     because the call to interrupt 0xff checks to see if the  item  after  the
  1841.     keystroke just received is a "BP" and if so will return AX = 1.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.     EGMay 8, 1988                                              Page  27FH
  1847.  
  1848.  
  1849.  
  1850.  
  1851.                                                            EGBloodhoundFH
  1852.  
  1853.  
  1854.     The  playback  command for test with breakpoints is the same as for those
  1855.     without i.e.  
  1856.  
  1857.                            C>b -pmytest foregnd.exe
  1858.  
  1859.     Note that whenever BLOODHOUND encounters a breakpoint it  stops  dead  in
  1860.     the  water,  i.e.   no more keys are played back, until the breakpoint is
  1861.     cleared.  This is done with interrupt 0xfe:  
  1862.  
  1863.  
  1864.     read_keyboard()
  1865.     {
  1866.     int scan,key;
  1867.     
  1868.     int86(0xff,  inregs,  outregs);              /* clear any breakpoint that
  1869.                                                     may be active
  1870.                                                  */
  1871.     scan =kbin( key);
  1872.     int86(0xff,  inregs,  outregs);              /* test for breakpoint */
  1873.     if (outregs.x.ax == 1) breakpoint();
  1874.     }
  1875.  
  1876.  
  1877.  
  1878.     There is one obvious problem with the above approach.  If the  foreground
  1879.     program  is  running  without BLOODHOUND then it will crash since it will
  1880.     execute interrupt 0xff without that interrupt  being  defined.   The  way
  1881.     around  this problem is to create a flag called, for example, "test_mode"
  1882.     which if set allows the interrupt to be called.  This flag would get  set
  1883.     only  if  the  appropriate  command  line  argument  were supplied to the
  1884.     foreground program which is done only when it is executed by BLOODHOUND.  
  1885.  
  1886.     Using the above reasoning, we would once again modify our program to be:  
  1887.  
  1888.  
  1889.     void main(argc,argv)
  1890.     int argc;
  1891.     char *argv[];
  1892.     {
  1893.     
  1894.     int test_mode = 0;             /* if this flag is set, then
  1895.                                       we have detected "test_mode" on the
  1896.                                       command line */
  1897.     
  1898.     if (!stricmp(argv[1],"test_mode"))
  1899.         {
  1900.         test_mode = 1;
  1901.         }
  1902.     
  1903.     /*  main program here */
  1904.     
  1905.     }
  1906.     
  1907.     
  1908.     read_keyboard()
  1909.     {
  1910.  
  1911.  
  1912.     EGMay 8, 1988                                              Page  28FH
  1913.  
  1914.  
  1915.  
  1916.  
  1917.                                                            EGBloodhoundFH
  1918.  
  1919.  
  1920.     int scan,key;
  1921.     
  1922.     if (test_mode)
  1923.         {
  1924.         int86(0xfe,  inregs,  outregs);            /* clear any breakpoint that
  1925.                                                       may be active
  1926.                                                    */
  1927.         }
  1928.     scan =kbin( key);
  1929.     if (test_mode)
  1930.         {
  1931.         int86(0xff,  inregs,  outregs);              /* test for breakpoint */
  1932.         if (outregs.x.ax == 1) breakpoint();
  1933.         }
  1934.     }
  1935.  
  1936.  
  1937.     The program modified above to include interrupt 0xfe will  thus  continue
  1938.     to read keys from the test after the function "breakpoint()" returns.  
  1939.  
  1940.     BLOODHOUND  breakpoints  are  most  useful  in conjunction with a program
  1941.     debugger.  Suppose that we wanted to execute the above foreground program 
  1942.     under the DOS "debug.com".  Then we would playback  the  test  using  the
  1943.     following command:  
  1944.  
  1945.                    C>b -p -b debug.com foregnd.exe test_mode
  1946.  
  1947.     The above command does the following:  
  1948.  
  1949.             (1) BLOODHOUND is executed in playback mode with test "keys.tst"
  1950.     
  1951.             (2) The foreground program is "debug.com"
  1952.     
  1953.             (3) The argument to "debug.com" is "foregnd.exe test_mode"
  1954.     
  1955.             (4) Debug executes after having loaded "foregnd.exe" and you will
  1956.                 see the "-" prompt.
  1957.     
  1958.             (5) The "-b" option forces an immediate breakpoint. This is to
  1959.                 prevent test keystrokes from being played back into the
  1960.                 debugger.
  1961.     
  1962.             (6) You can now type "g" to start execution of "foregnd.exe"
  1963.                 under debug.com
  1964.     
  1965.  
  1966.     Note  that  the  use  of  debugger  will  affect  the screen comparisions
  1967.     adversely since after debug loads you will see the "-".   Then  you  must
  1968.     type "g" to start executing which becomes in effect a key inputted to the 
  1969.     foregnd.exe program.  Thus the screen comparisions will fail.  
  1970.  
  1971.     The  solution to the above problem is to copy the ".tst" file to a ".dbg"
  1972.     file and execute that.  For example:  
  1973.  
  1974.     C>copy keys.tst keys.dbg
  1975.     C>b -pkeys.dbg debug.com foregnd.exe test_mode
  1976.  
  1977.  
  1978.     EGMay 8, 1988                                              Page  29FH
  1979.  
  1980.  
  1981.  
  1982.  
  1983.                                                            EGBloodhoundFH
  1984.  
  1985.  
  1986.     That is, any test file with extension ".dbg" automatically  does  not  do
  1987.     screen comparisions even if a ".cmp" file exists.  
  1988.  
  1989.     Note  that  whenever a test is played back via option "-p", a ".dbg" file
  1990.     is automatically created with "BP" inserted after each key that caused  a
  1991.     failure  (unless  the  test  being  played  back  has  extension ".dbg").
  1992.     Suppose, for example, we had a test called "mytest.tst" that looked like:  
  1993.  
  1994.                         t h i s sp i s sp a sp t e s t
  1995.  
  1996.     Now suppose that during playback the screen failed after the second  "s".
  1997.     Then the automatically generated file "mytest.dbg" would contain:  
  1998.  
  1999.                        t h i s sp i s BP sp a sp t e s t
  2000.  
  2001.     You  can  then  playback  the  debug file in the same manner as described
  2002.     above.  Your breakpoint will occur just AFTER the "s"  is  input  to  the
  2003.     keyboard  but  BEFORE  the  program  logic  takes off that demolishes the
  2004.     screen.  
  2005.  
  2006.     Note that if you get a failure from either a scroll or a "screen  capture
  2007.     under  program  control",  you  will  see  the BP just after the key that
  2008.     started the scroll or the last key executed before  the  "screen  capture
  2009.     under program control".  For example:  
  2010.  
  2011.                          F1 F9 h e l l o F5 BP t h i s
  2012.  
  2013.     If  key F5 started a scroll and there were one or more failures, then you
  2014.     would see the "BP" just after F5 as shown.  This could  also  be  a  test
  2015.     where  the  foreground  program  captured  a  screen using interrupt 0xfd
  2016.     sometime after F5 was executed.  
  2017.  
  2018.  
  2019.     To see a real example of how to execute a debugger  in  conjunction  with
  2020.     BLOODHOUND  and  a  foreground  program,  execute  the following from DOS
  2021.     (assuming you have DOS "debug.com" accessible):  
  2022.  
  2023.                C>b -ptest.dbg -b debug.com foregnd.exe test_mode
  2024.  
  2025.     After debug has loaded an executed, you will see the  "-"  prompt.   Note
  2026.     that  we  introduce  here  the  "-b" option which means "set breakpoint".
  2027.     This forces a breakpoint upon power-up and is necessary to keep the  test
  2028.     keys  from  feeding  into  the  debugger  rather  than  the program it is
  2029.     testing.  Note that this initial forced  breakpoint  gets  cleared  right
  2030.     away in the foreground program where it asserts interrupt 0xfe.  
  2031.  
  2032.     The file "test.dbg" that you are about to playback looks like:  
  2033.  
  2034.  
  2035.     N o w sp i s sp t h e BP sp t i m e 
  2036.  
  2037.     We  assume  that there is a program bug just after where the first "e" is
  2038.     executed.  We want to stop in trap function "breakpoint" at  that  point.
  2039.     It  so  happens  that this function resides at 9F:13A.  Therefore look at
  2040.     your value of CS:IP and at  this  number  to  it.   If  CS:IP  were,  for
  2041.     example,  4085:0100  then after the above addition you get 4124:23A.  Now
  2042.  
  2043.  
  2044.     EGMay 8, 1988                                              Page  30FH
  2045.  
  2046.  
  2047.  
  2048.  
  2049.                                                            EGBloodhoundFH
  2050.  
  2051.  
  2052.     execute the debug command:  
  2053.  
  2054.                                    g4124:23A
  2055.  
  2056.     and your program will playback as normal, finally stopping at  the  start
  2057.     of  function  "breakpoint()".   To  continue  merely type "g" and you the
  2058.     breakpoint will clear since interrupt 0xfe gets called the next time thru 
  2059.     the keyboard function.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.     EGMay 8, 1988                                              Page  31FH
  2111.  
  2112.  
  2113.  
  2114.  
  2115.                                                            EGBloodhoundFH
  2116.  
  2117.  
  2118.     EG 12.0 CUSTOMIZING BLOODHOUND FH 
  2119.  
  2120.     The following parameters can be customized via  a  customer  configurable
  2121.     file "b.cfg".  
  2122.  
  2123.     1.    Max  number  of  program  failures  before  playback  automatically
  2124.     terminates.  
  2125.  
  2126.     2.   Interrupt  numbers   for   "check_breakpoint",   "clear_breakpoint",
  2127.     "capture screen".  
  2128.  
  2129.     3.  Number of 1/18's of a second to delay between keystrokes.  Useful for 
  2130.     those  programs which use the timer interrupt to output to the screen and
  2131.     it is necessary to wait a while after each keystroke for  the  screen  to
  2132.     "settle"  before  capturing  it.   This also is useful for those programs
  2133.     which "flush" the keyboard at various points to make sure  there  are  no
  2134.     keys  active.  Normally, the default of 1 clock tick delay will foil most
  2135.     flushing so that no keys are lost.  However, longer delays can be created 
  2136.     if necessary.  
  2137.  
  2138.     4.  Number of 1/18's a second to delay at start of  program.   Useful  if
  2139.     you  must  delay  at  the  start of the program to allow your program and
  2140.     screen to "settle" before starting the test.  
  2141.  
  2142.     The parameter names, default values and allowable ranges are as follows:  
  2143.  
  2144.  
  2145.                 Parameter name     Default          Allowable range
  2146.     
  2147.                 max_failures       10               1-1000
  2148.                 check_breakpoint   0xff             45 - 0xff
  2149.                 clear_breakpoint   0xfe             45 - 0xff
  2150.                 capture_screen     0xfd             45 - 0xff
  2151.                 delay              1                0 - 32767
  2152.                 power_on_delay     18               0 - 32767
  2153.  
  2154.  
  2155.     Note that upon delivery, there is no b.cfg, i.e.  the defaults  hold.   A
  2156.     sample b.cfg file might be:  
  2157.  
  2158.  
  2159.                                 max_failures 20
  2160.                                 delay 10
  2161.                                 set_breakpoint 0x50
  2162.  
  2163.                                 (other values are defaults)
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.     EGMay 8, 1988                                              Page  32FH
  2177.  
  2178.  
  2179.  
  2180.  
  2181.                                                            EGBloodhoundFH
  2182.  
  2183.  
  2184.     EG 13.0 BLOODHOUND FILE STRUCTURE FH 
  2185.  
  2186.     The following files are necessary to execute the BLOODHOUND PROGRAM:  
  2187.  
  2188.  
  2189.                                BLOOD.EXE
  2190.                                VIEW.EXE
  2191.                                SYS$MSG.DAT
  2192.                                SYS$ERR.DAT
  2193.                                $RUN.OVL
  2194.                                IBM$RUN.OVL
  2195.                                b.cfg   (optional)
  2196.  
  2197.  
  2198.     
  2199.     
  2200.         The following file extensions are BLOODHOUND data files:
  2201.     
  2202.           Extension                   File type
  2203.     
  2204.             .tst                      test program of keystrokes
  2205.             .cmp                      contains screen compare images
  2206.             .dbg                      test program with breakpoints after errors
  2207.             .err                      error file (good screens vs. bad screens)
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.     EGMay 8, 1988                                              Page  33FH
  2243.  
  2244.  
  2245.  
  2246.  
  2247.                                                            EGBloodhoundFH
  2248.  
  2249.  
  2250.     EG 14.0 MEMORY REQUIREMENTS FH 
  2251.  
  2252.  
  2253.     Executing  BLOODHOUND  will  reduce  available  RAM memory by about 127K.
  2254.     However, BLOODHOUND is not memory resident so that when you return to DOS 
  2255.     all this memory is again available.  
  2256.  
  2257.  
  2258.     There is no limit on the size of disk files other than the  size  of  the
  2259.     hard  disk.   The  disk  files  are those with extensions ".tst", ".cmp",
  2260.     ".err", ".dbg".  Typically storage requirements for these files are:  
  2261.  
  2262.  
  2263.     
  2264.             FILE TYPE                  REQUIREMENTS
  2265.     
  2266.                  .tst                  approx 3 bytes/keystroke
  2267.                  .dbg                  approx 3 bytes/keystroke
  2268.                  .cmp                  approx 300 bytes/screen
  2269.                  .err                  8000 bytes per screen compare
  2270.                                        failure
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.     EGMay 8, 1988                                              Page  34FH
  2309.  
  2310.  
  2311.  
  2312.  
  2313.                                                            EGBloodhoundFH
  2314.  
  2315.  
  2316.     EG 15.0 COMPATIBILITY WITH SUPERKEY FH 
  2317.  
  2318.     BLOODHOUND is compatible with  SUPERKEY  (registered  trademark,  Borland
  2319.     international),  with  one  limitation.   If  you  should use SUPERKEY to
  2320.     define key F1 to be "this is a test", for example, then  whenever  F1  is
  2321.     pressed  during  record  mode, you will record "this is a test" into your
  2322.     test program and not "F1".  If you should manually edit your test so that 
  2323.     you inserted "F1", then when this key is played  back  it  will  playback
  2324.     "this  is  a test".  Note, however, that the screen will be captured only
  2325.     once for this entire key sequence.  
  2326.  
  2327.     Another consideration is that the test program must not have as its  last
  2328.     key a SUPERKEY defined keystroke.  For example, the test program:  
  2329.  
  2330.     F1 F10 
  2331.  
  2332.     will work fine if F1 has been defined by SUPERKEY but not if F10 has been 
  2333.     defined.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.     EGMay 8, 1988                                              Page  35FH
  2375.  
  2376.  
  2377.  
  2378.  
  2379.                                                            EGBloodhoundFH
  2380.  
  2381.  
  2382.     EG 16.0 HINTS AND SUGGESTIONS FH 
  2383.  
  2384.  
  2385.     (1)  Break  up the test of your program into small modules which then can
  2386.     be executed as a series of batch  commands.   For  example,  suppose  you
  2387.     create  test  modules  "mytest1",  "mytest2",  "mytest3".  You could then
  2388.     create a batch file called "test.bat" whose contents were:  
  2389.  
  2390.                         blood -pmytest1 myprog
  2391.                         blood -pmytest2 myprog
  2392.                         blood -pmytest3 myprog
  2393.  
  2394.     Each of the above test modules could test  a  distinct  feature  of  your
  2395.     program.   This  makes  maintaince of your test files much easier since a
  2396.     change in  one  feature  of  your  program  (eg.   a  different  keyboard
  2397.     definition) will not impact the other recorded tests.  
  2398.  
  2399.     (2)  It  is  conceiveable that your foreground may have part of a display
  2400.     that is continually varying that would  cause  you  to  get  many  screen
  2401.     compare  errors  even  though  nothing  is  wrong  with your program.  An
  2402.     example would be a line on your main menu that displayed something like:  
  2403.  
  2404.                            xxxxx bytes remaining
  2405.  
  2406.     "xxxxx" will vary with the size of your program (and the size  of  future
  2407.     releases  of  BLOODHOUND).   The only solution is to have a flag (such as
  2408.     the one called "test_mode" described in section 11.0) within your program 
  2409.     that senses your are in BLOODHOUND and that causes such screen output not 
  2410.     to occur.  Another example of a continually  varying  foreground  is  the
  2411.     display  of  real  time.  Even though the time can be set via the "TIME:"
  2412.     test item, the seconds is  not  guaranteed  to  tick  over  at  the  same
  2413.     keystroke  each  run  of  the test, introducing compare errors.  The only
  2414.     solution in such a case is to disable the display of time altogether.  
  2415.  
  2416.     (3) Do not start any background printing tasks  via  command  "print.com"
  2417.     before executing BLOODHOUND as this will caus the system to hangup.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.     EGMay 8, 1988                                              Page  36FH
  2441.  
  2442.  
  2443.  
  2444.  
  2445.                                                            EGBloodhoundFH
  2446.  
  2447.  
  2448.     EG 17.0 LIMITATIONS FH 
  2449.  
  2450.     The following are limitations to Bloodhound:  
  2451.  
  2452.     (1)  Note  that  when reading keys from stdin (eg.  "scanf()" function in
  2453.     the "C" language), the screen will be captured only at the start  of  the
  2454.     read.  For example, if you type "this is a test (enter) hello (enter)" in 
  2455.     response  to two scanf instruction then the screen is captured just prior
  2456.     to the "t" in "this" and "h" in hello.  In such a  case  the  test  looks
  2457.     like:  
  2458.  
  2459.                 t h i s sp i s sp a sp t e s t enter h e l l o enter
  2460.  
  2461.     If  both  screens  fail then the automatic breakpoints in the ".dbg" file
  2462.     will be inserted after the enter's, i.e.:  
  2463.  
  2464.                 t h i s sp i s sp a sp t e s t enter BP h e l l o enter BP
  2465.  
  2466.     Thus if you had a keyboard routine with scanf's and wanted  to  test  for
  2467.     breakpoints you would write it thusly:  
  2468.  
  2469.  
  2470.     read_keyboard()
  2471.     {
  2472.     char s[81];
  2473.     
  2474.     if (test_mode)
  2475.         {
  2476.         int86(0xfe,  inregs,  outregs);            /* clear any breakpoint that
  2477.                                                       may be active
  2478.                                                    */
  2479.         }
  2480.     scanf("%s",s);
  2481.     if (test_mode)
  2482.         {
  2483.         int86(0xff,  inregs,  outregs);              /* test for breakpoint */
  2484.         if (outregs.x.ax == 1) breakpoint();
  2485.         }
  2486.     }
  2487.     
  2488.     Note that when dealing with stdin such as scanf's and you want to insert a
  2489.     breakpoint manually, do NOT insert the breakpoint before the "enter", i.e.:
  2490.     
  2491.     
  2492.                    t h i s sp i s BP sp a sp t e s t enter h e l l o enter
  2493.     
  2494.                                       WRONG
  2495.     
  2496.                    t h i s sp i s sp a sp t e s t enter BP h e l l o enter
  2497.     
  2498.                                       RIGHT
  2499.     
  2500.     
  2501.     This is because "BP" always causes BLOODHOUND to stop
  2502.     inputting keys and the result will be that the system will hang since the
  2503.     the scanf is never completed and the breakpoint is never cleared.
  2504.  
  2505.  
  2506.     EGMay 8, 1988                                              Page  37FH
  2507.  
  2508.  
  2509.  
  2510.  
  2511.                                                            EGBloodhoundFH
  2512.  
  2513.  
  2514.     
  2515.     (2) Also note that when doing input from stdin that software interrupt 0xfc
  2516.     is reserved for internal use
  2517.     
  2518.     (3) The current version of Bloodhound will not properly record and playback
  2519.     keystrokes that use the control key in conjunction with two other alpha
  2520.     keys, eg "KD" such as found in WordStar.
  2521.     
  2522.     
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.     EGMay 8, 1988                                              Page  38FH
  2573.  
  2574.  
  2575.  
  2576.  
  2577.                                                            EGBloodhoundFH
  2578.  
  2579.  
  2580.     EG 18.0 ERROR MESSAGES FH 
  2581.  
  2582.     Below follows an alphabetic listing of error messages and their 
  2583.     significance ("nnnn" is argument to error message).  
  2584.  
  2585.  
  2586.     Can't find file nnnn, no screen comparisions will take place during 
  2587.     playback of keystrokes" 
  2588.  
  2589.     Explanation:  This is not really an error.  It merely says that the test 
  2590.     you specified has no ".cmp" and that no comparisions will take place.  
  2591.     This occurs if you record a file with the "-r" option and immediately 
  2592.     play it back with the "-p" and do not make screens with the "-m".  The 
  2593.     message is to keep you from thinking that your test has passed.  
  2594.  
  2595.  
  2596.     Can't have "nnnn" and "nnnn" options simultaneously 
  2597.  
  2598.     Explanation:  The two options specified were mutually exclusive.  You 
  2599.     can't for example, record keystrokes ("-r") and generate screens ("-m") 
  2600.     at the same time.  
  2601.  
  2602.  
  2603.     Can't load foreground program "nnnn".  Does it exist?  Is there enough 
  2604.     memory 
  2605.  
  2606.     Explanation:  Either the foreground program you specified did not exist 
  2607.     or there was not enough memory to load it.  
  2608.  
  2609.  
  2610.     "Can't open file "nnnn" 
  2611.  
  2612.     Explanation:  The indicated file cannot be opened.  This is an internal 
  2613.     error and should not occur.  
  2614.  
  2615.  
  2616.     Error closing file "nnnn".  
  2617.  
  2618.     Explanation:  This error might be due to disk full.  If disk is not full 
  2619.     then it is an internal error.  
  2620.  
  2621.  
  2622.     Error opening file "nnnn".  Does it exist?  
  2623.  
  2624.     Explanation:  This will occur if you specify an illegal disk drive while 
  2625.     using the "-d" option.  At any other time this error should never occur 
  2626.     and is internal error.  
  2627.  
  2628.  
  2629.     Error putting char to file 
  2630.  
  2631.     Explanation:  this error should never occur is internal error.  
  2632.  
  2633.  
  2634.     Error reading ".cmp" file.  Do you have the correct file?  Or have you 
  2635.     edited the key file without re-generating the screen images?  Perhaps you 
  2636.  
  2637.  
  2638.     EGMay 8, 1988                                              Page  39FH
  2639.  
  2640.  
  2641.  
  2642.  
  2643.                                                            EGBloodhoundFH
  2644.  
  2645.  
  2646.     need to re-execute BLOODHOUND with the "-m" option.  
  2647.  
  2648.     Explanation:  This occur occurs whenever something has gone wrong with 
  2649.     the ".cmp" file.  Somehow you have a ".cmp" file that does not match the 
  2650.     currently executing ".tst" file.  You may have edited your ".tst" file or 
  2651.     changed your foreground program without re-generating the ".cmp" file 
  2652.     using the "-m" option.  
  2653.  
  2654.  
  2655.     Error reading file "nnnn".  
  2656.  
  2657.     Explanation:  This error should never occur and is internal error.  
  2658.  
  2659.  
  2660.     Error seeking file "nnnn".  
  2661.  
  2662.     Explanation:  This error should never occur and is internal error.  
  2663.  
  2664.  
  2665.     Error writing file "nnnn".  Could be disk full.  
  2666.  
  2667.     Explanation:  It was not possible to write the indicated file to disk.  
  2668.     The most likely reason is disk full.  If your disk is not full then this 
  2669.     should be regarded as an internal error.  
  2670.  
  2671.  
  2672.     Illegal date "nnnn".  The correct format is mm/dd/yr where "yr" must be 
  2673.     between 80 and 99 inclusive.  
  2674.  
  2675.     Explanation:  The date you specified must match the above format.  
  2676.  
  2677.  
  2678.     Illegal offset in ".cmp" file.  Do you have the correct ".cmp" file?  
  2679.  
  2680.     Explanation:  same as for "Error reading ".cmp" file above 
  2681.  
  2682.  
  2683.     Illegal time "nnnn".  The correct time format is "hr:mins:secs" where hrs 
  2684.     can vary from 0-23, and mins/secs can vary from 0-59.  "secs" is 
  2685.     optional, however, ":" must be specified, eg.  "14:06:".  
  2686.  
  2687.     Explanation:  The time you specified must match the above format.  
  2688.  
  2689.  
  2690.     "nnnn" is illegal disk drive letter 
  2691.  
  2692.     Explanation:  you attempted to specify a disk drive that is not valid, 
  2693.     eg.  "-dE" when drive "E" was not on your system 
  2694.  
  2695.  
  2696.     "nnnn" is illegal option 
  2697.  
  2698.     Explanation:  the option after the "-" was not recognizable 
  2699.  
  2700.  
  2701.     Missed scroll image.  Due to inherent DOS timing considerations, 
  2702.  
  2703.  
  2704.     EGMay 8, 1988                                              Page  40FH
  2705.  
  2706.  
  2707.  
  2708.  
  2709.                                                            EGBloodhoundFH
  2710.  
  2711.  
  2712.     BLOODHOUND failed to capture/compare a scroll image.  The record/playback 
  2713.     of your test cannot continue.  
  2714.  
  2715.     Explanation:  DOS has some internal limits that may cause BLOODHOUND to 
  2716.     miss a scroll capture if the screen scrolls too fast.  Consider inserting 
  2717.     a 70 ms time delay after each high level "print" type statement (eg.  
  2718.     "printf").  
  2719.  
  2720.  
  2721.     No foreground program specified 
  2722.  
  2723.     Explanation:  You failed to specify after the "-m", "-r" or "-p" option a 
  2724.     program to be executed.  
  2725.  
  2726.  
  2727.     parameter "nnnn" in b.cfg has unrecognized value "nnnn" 
  2728.  
  2729.     Explanation:  You gave an illegal value to a parameter in "b.cfg" option 
  2730.     eg "max_failures" greater than 1000.  
  2731.  
  2732.  
  2733.     parameter "nnnn" illegal 
  2734.  
  2735.     Explanation:  You specified a parameter in b.cfg that was illegal, eg.  
  2736.     "max_failure" rather than "max_failures" 
  2737.  
  2738.  
  2739.     Test "nnnn" not found 
  2740.  
  2741.     Explanation:  You specified a test name that does not exist.  
  2742.  
  2743.  
  2744.     The test item "nnnn" is not valid.  
  2745.  
  2746.     Explanation:  You may have mispelled a key such as "esk" instead of "esc" 
  2747.     or you mispelled a test function, eg.  "DAT:1/5/85" instead of 
  2748.     "DATE:1/5/85.  
  2749.  
  2750.  
  2751.     Your test had more than "nnnn" failures.  
  2752.  
  2753.     Explanation:  The playback of your test exceeded the maximum number of 
  2754.     allowed failures.  The default number is 10.  You may specify this to be 
  2755.     any number you wish as explained in section 12.0.  
  2756.  
  2757.  
  2758.     EG 18.0 DISCLAIMER FH 
  2759.  
  2760.     This product is supplied on an "as is" basis only with no warranty of any 
  2761.     kind.  If it malfunctions, then Richard Fencel is not liable for any 
  2762.     damages.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.     EGMay 8, 1988                                              Page  41FH
  2771.  
  2772.  
  2773.  
  2774.          ----------------end-of-author's-documentation---------------
  2775.  
  2776.                         Software Library Information:
  2777.  
  2778.                    This disk copy provided as a service of
  2779.  
  2780.                         The Public (Software) Library
  2781.  
  2782.          We are not the authors of this program, nor are we associated
  2783.          with the author in any way other than as a distributor of the
  2784.          program in accordance with the author's terms of distribution.
  2785.  
  2786.          Please direct shareware payments and specific questions about
  2787.          this program to the author of the program, whose name appears
  2788.          elsewhere in  this documentation. If you have trouble getting
  2789.          in touch with the author,  we will do whatever we can to help
  2790.          you with your questions. All programs have been tested and do
  2791.          run.  To report problems,  please use the form that is in the
  2792.          file PROBLEM.DOC on many of our disks or in other written for-
  2793.          mat with screen printouts, if possible.  The P(s)L cannot de-
  2794.          bug programs over the telephone.
  2795.  
  2796.          Disks in the P(s)L are updated monthly, so if you did not get
  2797.          this disk  directly from the P(s)L,  you should be aware that
  2798.          the files in this set may no  longer be the current versions.
  2799.  
  2800.          For a copy of the latest monthly software library newsletter
  2801.          and a list of the 1,000+ disks in the library, call or write
  2802.  
  2803.                         The Public (Software) Library
  2804.                               P.O.Box 35705 - F
  2805.                            Houston, TX 77235-5705
  2806.                                (713) 665-7017
  2807.  
  2808.